<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no,email=no" name="format-detection">
    <title>首页-{$tpshop_config['shop_info_store_title']}</title>
    <link rel="icon" type="image/png" href="http://wxv2.lppz.com/shop_resource/wechat/images/favicon.png">
    <link rel="stylesheet" href="http://wxv2.lppz.com/shop_resource/wechat/css/app.css">
    <link rel="stylesheet" type="text/css" href="__STATIC__/css/public.css"/>
    <script src="http://wxv2.lppz.com/shop_resource/wechat/js/jquery.min.js"></script>
<script src="http://wxv2.lppz.com/shop_resource/wechat/js/page/index.js"></script>
<script src="__PUBLIC__/js/global.js"></script>
<script >
var Tday = new Array();
var daysms = 24 * 60 * 60 * 1000
var hoursms = 60 * 60 * 1000
var Secondms = 60 * 1000
var microsecond = 1000
var DifferHour = -1
var DifferMinute = -1
var DifferSecond = -1

function clock11(key)
{
   var time = new Date()
   var hour = time.getHours()
   var minute = time.getMinutes()
   var second = time.getSeconds()
   var timevalue = ""+((hour > 12) ? hour-12:hour)
   timevalue +=((minute < 10) ? ":0":":")+minute
   timevalue +=((second < 10) ? ":0":":")+second
   timevalue +=((hour >12 ) ? " PM":" AM")
   var convertHour = DifferHour
   var convertMinute = DifferMinute
   var convertSecond = DifferSecond
   var Diffms = Tday[key].getTime() - time.getTime()
   DifferHour = Math.floor(Diffms / daysms)
   Diffms -= DifferHour * daysms
   DifferMinute = Math.floor(Diffms / hoursms)
   Diffms -= DifferMinute * hoursms
   DifferSecond = Math.floor(Diffms / Secondms)
   Diffms -= DifferSecond * Secondms
   var dSecs = Math.floor(Diffms / microsecond)
  
  if(convertHour != DifferHour) e="<span class=hour>"+DifferHour+"</span>天";
   if(convertMinute != DifferMinute) f="<span class=min>"+DifferMinute+"</span>时";
   if(convertSecond != DifferSecond) g="<span class=sec>"+DifferSecond+"</span>分";
     h="<span class=msec>"+dSecs+"</span>秒";
     if (DifferHour>0) {e=e}
     else {e=''}
     //document.getElementById("jstimerBox"+key).innerHTML = e + f + g + h; 
     return (e + f + g + h);
}

</script>
<style>
		.cc_icon{
			position:absolute;
			left:0;
			top:0;
			z-index:100;
			width:20%;
		}
		.deline{
			text-decoration:line-through;
			color:#999;
			font-size:12px;
			font-weight:bold;
		}
		.ad-mcube-list{max-height:inherit!important;}
		.search-header .search-form input{
			background: url(/public/static/images/mobile/index/top_search_bg.png) no-repeat 35px 50% #eee;
		}
		.custom-goods{background: #00ACE4;padding: 2px;}
		.ad-mcube-list{background: #00ACE4;}
		.goods-buy .icon-shop_cart{
			background: url(__STATIC__/images/category/cart.png) no-repeat center center;
			height: 30px;
			width: 40px;
			background-size: 30px 30px;
			display: block;
			}
		.label-prom{color:#fff;display: block;width:40px;height: 40px;position: absolute;top:0;background: url(__STATIC__/images/label-prom.png) no-repeat center top;background-size:90%;text-align: center;font-size: 14px;font-weight: bold;line-height: 26px}
		</style>
</head>

<body class="has-foot-nav">
<div class="scroll-wrapper">   
	<!-- 顶部搜索 -->
	 <header class="search-header fixed-bar">
		<div class="fixed-bar-area bd-btm">
	  		<div class="search-back"><a href="javascript:history.go(-1)"><i class="picon icon-back"></i></a></div>
	  		<div class="search-form">
	  			<input class="sch-ipt form-input search-go-page" type="text" name="" id="search-text" value="">
	  			<i class="picon icon-sch-ipt"></i>
	  			<a class="picon icon-circle-delete" href="javascript:;"></a>
	  		</div>
	  		<div class="search-link"><a href="javascript:void(0)" onclick="subsearch()">搜索</a></div>
  		</div>
  	</header>
<div class="ad-mcube-list clearfix" type="type1">
    <div class="mcube-item">
       <adv  pid="1" limit="1" item="v">
		<img class="goods-photo lazyimg" src="/public/static/images/mobile/img_default@4x1.png" data-src="{$v[ad_code]}" usemap="#planetmap">
		<map name="planetmap" id="planetmap">
			<area shape="rect" coords="80,815,240,920" href ="{:U('User/getcoupon')}?id=24" />
			<area shape="rect" coords="290,815,460,920" href ="{:U('User/getcoupon')}?id=25"/>
			<area shape="rect" coords="510,815,670,920" href ="{:U('User/getcoupon')}?id=26"/>
		</map>
		</adv> 
	</div>
	<div class="mcube-item">
       <adv  pid="405" limit="1" item="v">
		<img class="goods-photo lazyimg" src="/public/static/images/mobile/img_default@4x1.png" data-src="{$v[ad_code]}" usemap="#planetmap">
		<map name="planetmap" id="planetmap">
			<area shape="rect" coords="0,0,260,365" href ="/index.php/Mobile/Goods/goodsList/type/2/id/6.html" />
			<area shape="rect" coords="260,0,460,195" href ="/index.php/Mobile/Goods/goodsList/type/2/id/7.html"/>
			<area shape="rect" coords="460,0,750,195" href ="/index.php/Mobile/Goods/goodsList/type/2/id/5.html"/>
			<area shape="rect" coords="260,195,560,365" href ="/index.php/mobile/Goods/search.html?q=%E8%A3%99"/>
			<area shape="rect" coords="560,195,750,365" href ="/index.php/mobile/Goods/search/qtype/is_new.html"/>
		</map>
		</adv> 
	</div>
	<div style="clear:both"></div>
</div> 

<div class="custom-image-swiper">
	<div class="slider-main custom-slider">
		<adv pid='2' limit='8' item='v'>
			<div class="slider-item"><a href="{$v.ad_link}"><img class="lazyslide" src="http://wxv2.lppz.com/shop_resource/wechat/images/slider_default.png" data-src="{$v[ad_code]}" alt=""></a></div>
		</adv>
	</div>
</div>


<div class="ad-mcube-list clearfix" type="type1">
    <div class="mcube-item" style="text-align:center">
    <adv pid='8' limit='1' item='v'>
        <a href="{:U('Goods/search',array('qtype'=>'is_recommend'))}" class="link js-mcube">
	<img class="goods-photo lazyimg" src="http://wxv2.lppz.com/shop_resource/wechat/images/img_default@4x1.png" data-src="{$v[ad_code]}" style="width:100%!important;margin:0 auto">
</a> </adv></div>
</div> <div class="custom-goods">
	<ul class="sc-goods-list clearfix two-col show">
			<volist name="recommend_goods" id="v" key="k" length="6">
			    <li class="goods-card">
			    <if condition="$v[is_prom] eq 2 "><img src="/public/static/images/mobile/cc_icon.png" width="100" class="cc_icon"></if>
			    <if condition="$v[is_prom] eq 1 "><img src="/public/static/images/mobile/cc_icon2.png" width="100" class="cc_icon"></if>
			    
			        <a href="{:U('Mobile/Goods/goodsInfo',array('id'=>$v[goods_id],'u_id'=>$user['user_id']))}" class="link js-goods clearfix">
			    
			            <div class="photo-block">
			            	<img class="goods-photo lazyimg" src="http://wxv2.lppz.com/shop_resource/wechat/images/img_default@1x1.png" data-src="{$v.goods_id|goods_thum_images=400,400}" width="100%">
			            	<if condition="$v[is_prom] eq 2 or $v[is_prom] eq 1">
			            	<div class="z-time"><div class="jstimerBox{$v[goods_id]}"></div></div>
			            	<script>
			            	Tday['{$v[goods_id]}'] = new Date('{$v.end_time|date="Y/m/d H:i:s",###}');  
			            	window.setInterval(function()    
			            	{
			            	  $('.jstimerBox{$v[goods_id]}').html(clock11('{$v[goods_id]}'));
			            	}, 1000);  
			            	</script> 
			            	 </if>
			            	<if condition="$v[is_prom] eq 3"><div class="label-prom">{$v.prom_name}</div></if>
			            </div>
			            <div class="info clearfix">
			                <p class="goods-title">{$v.goods_name}</p>
			                <p class="goods-price goods-price-icon">
				                <em class="lazyprice"  data-sku="11000524" data-activity="850">
	                                    <if condition="$v[is_prom] eq 2">
	                                       <i class="label-red">筹</i>
	                                    <elseif condition="$v[is_prom] eq 1">
	                                    	<i class="label-red">秒</i>
	                                    <elseif condition="$v[is_prom] eq 3"/>
	                                   	   <i class="label-red">{$v.prom_name}</i>
	                                    </if>
	                                    ￥{$v.shop_price}<font class="deline">￥{$v.market_price}</font>
				                </em>
			                </p>
			                <style>.label-red{background: red;width:20px;height: 20px;border-radius: 5px;padding:0px 2px;color:#fff;font-size:11px;font-style: normal;}
			                .z-time{position: absolute;bottom: 10px;width:100%;color:#fff;text-align: center;opacity: 0.5;height: 20px;line-height: 20px;text-align: center;}
			                .z-time div{display: block;width:93%;background: #D5006A;height: 20px;line-height: 20px;margin:0 auto;}
			                </style>
			            </div>
			            	<div class="goods-buy btn1" sku="11000524" goodsId="" onclick="AjaxAddCart({$v[goods_id]},1,0);"><i class="icon-shop_cart"></i></div>
			        </a>
			    </li>
			  
			  </volist>
			</ul>

			
	</div><div class="ad-mcube-list clearfix" type="type1">
	    <div class="mcube-item" style="text-align:center">
	    <adv pid='9' limit='1' item='v'>
	        <a href="{:U('Goods/search',array('qtype'=>'is_new'))}" class="link js-mcube">
		<img class="goods-photo lazyimg" src="http://wxv2.lppz.com/shop_resource/wechat/images/img_default@4x1.png" data-src="{$v[ad_code]}" style="width:100%!important;margin:0 auto">
	</a>   </adv> </div>
	</div>  <div class="custom-goods">

		<ul class="sc-goods-list clearfix two-col show">
		    <volist name="new_goods" id="v" key="k" length='6'>
		        <li class="goods-card">
		        	  <if condition="$v[is_prom] eq 2 "><img src="/public/static/images/mobile/cc_icon.png" width="100" class="cc_icon"></if>
		        	   <if condition="$v[is_prom] eq 1 "><img src="/public/static/images/mobile/cc_icon2.png" width="100" class="cc_icon"></if>
			    
			        <a href="{:U('Mobile/Goods/goodsInfo',array('id'=>$v[goods_id],'u_id'=>$user['user_id']))}" class="link js-goods clearfix">
			    
		                <div class="photo-block">
			            	<img class="goods-photo lazyimg" src="http://wxv2.lppz.com/shop_resource/wechat/images/img_default@1x1.png" data-src="{$v.goods_id|goods_thum_images=400,400}" width="100%">
			            	 <if condition="$v[is_prom] eq 2 or $v[is_prom] eq 1 ">
			            	<div class="z-time"><div class="jstimerBox{$v[goods_id]}"></div></div>
			            	<script>
			            	Tday['{$v[goods_id]}'] = new Date('{$v.end_time|date="Y/m/d H:i:s",###}');  
			            	window.setInterval(function()    
			            	{
			            	  $('.jstimerBox{$v[goods_id]}').html(clock11('{$v[goods_id]}'));
			            	}, 1000);  
			            	</script> 
			            	 </if>
			            	<if condition="$v[is_prom] eq 3"><div class="label-prom">{$v.prom_name}</div></if>
			            </div>
		                <div class="info clearfix">
		                    <p class="goods-title">{$v.goods_name}</p>
		                    <p class="goods-price goods-price-icon">
		    	                <em class="lazyprice"  data-sku="11000524" data-activity="850">
	                                 <if condition="$v[is_prom] eq 2">
	                                       <i class="label-red">筹</i>
	                                    <elseif condition="$v[is_prom] eq 1">
	                                    	<i class="label-red">秒</i>
	                                    <elseif condition="$v[is_prom] eq 3"/>
	                                   	   <i class="label-red">{$v.prom_name}</i>
	                                    </if>
	                                    ￥{$v.shop_price}<font class="deline">￥{$v.market_price}</font>
		    	                </em>
		                    </p>
		                </div>
		                <div class="goods-buy btn1" goodsId="" onclick="AjaxAddCart({$v[goods_id]},1,0);"><i class="icon-shop_cart"></i></div>
		                
		            </a>
		        </li>
		      </volist>
		</ul>
	</div><div class="ad-mcube-list clearfix" type="type1">
	    <div class="mcube-item" style="text-align:center">
	    <adv pid='10' limit='1' item='v'>
	        <a href="{:U('Goods/search',array('qtype'=>'is_hot'))}" class="link js-mcube">
		<img class="goods-photo lazyimg" src="http://wxv2.lppz.com/shop_resource/wechat/images/img_default@4x1.png" data-src="{$v[ad_code]}" style="width:100%!important;margin:0 auto">
	</a>   </adv> </div>
	</div><div class="custom-goods">
		<ul class="sc-goods-list clearfix two-col show">
		   <volist name="hot_goods" id="v" key="k" length='6'>
		        <li class="goods-card">
		        <if condition="$v[is_prom] eq 2 "><img src="/public/static/images/mobile/cc_icon.png" width="100" class="cc_icon"></if>
		         <if condition="$v[is_prom] eq 1 "><img src="/public/static/images/mobile/cc_icon2.png" width="100" class="cc_icon"></if>
			    	
			        <a href="{:U('Mobile/Goods/goodsInfo',array('id'=>$v[goods_id],'u_id'=>$user['user_id']))}" class="link js-goods clearfix">
			    
		                <div class="photo-block">
			            	<img class="goods-photo lazyimg" src="http://wxv2.lppz.com/shop_resource/wechat/images/img_default@1x1.png" data-src="{$v.goods_id|goods_thum_images=400,400}" width="100%">
			            	  <if condition="$v[is_prom] eq 2 or $v[is_prom] eq 1 ">
			            <div class="z-time"><div class="jstimerBox{$v[goods_id]}"></div></div>
			            	<script>
			            	Tday['{$v[goods_id]}'] = new Date('{$v.end_time|date="Y/m/d H:i:s",###}');  
			            	window.setInterval(function()    
			            	{
			            	  $('.jstimerBox{$v[goods_id]}').html(clock11('{$v[goods_id]}'));
			            	}, 1000);  
			            	</script> 
			            	 </if>
			            	<if condition="$v[is_prom] eq 3"><div class="label-prom">{$v.prom_name}</div></if>
			            </div>
		                <div class="info clearfix">
		                    <p class="goods-title">{$v.goods_name}</p>
		                    <p class="goods-price goods-price-icon">
		    	                <em class="lazyprice"  data-sku="11000524" data-activity="850">
	                                  <if condition="$v[is_prom] eq 2">
	                                       <i class="label-red">筹</i>
	                                     <elseif condition="$v[is_prom] eq 1">
	                                    	<i class="label-red">秒</i>
	                                    <elseif condition="$v[is_prom] eq 3"/>
	                                   	   <i class="label-red">{$v.prom_name}</i>
	                                    </if>
	                                    ￥{$v.shop_price}<font class="deline">￥{$v.market_price}</font>
		    	                </em>
		                    </p>
		                </div>
		                	<div class="goods-buy picon btn1" sku="11000524" goodsId="" onclick="AjaxAddCart({$v[goods_id]},1,0);"><i class="icon-shop_cart"></i></div>
		            </a>
		        </li>
		      </volist>
		</ul>
	</div> 

	<div class="ad-mcube-list clearfix" type="type1">
	    <div class="mcube-item" style="text-align:center">
	    <adv pid='11' limit='1' item='v'>
	        <a href="javascript:;" class="link js-mcube">
		<img class="goods-photo lazyimg" src="http://wxv2.lppz.com/shop_resource/wechat/images/img_default@4x1.png" data-src="{$v[ad_code]}" style="width:100%!important;margin:0 auto">
	</a>   </adv> </div>
	</div>
	<div class="custom-goods" id="J_ItemList">
		<ul class="sc-goods-list clearfix two-col show ">
		    
		</ul>
		<a href="javascript:;" class="get_more" style="text-align:center; display:block;"> 
		<img src='__STATIC__/images/category/loader.gif' width="12" height="12"> </a> 
	</div>
	<div id="getmore" style="font-size:.24rem;text-align: center;color:#888;padding:.25rem .24rem .4rem;">
	  	<a href="javascript:void(0)" onClick="getGoodsList()">点击加载更多</a>
	</div> 

<script>
	document.body.style.background = "#f9f3f7";
</script> 
<script type="text/javascript">


$(function(){
	//$('#J_ItemList').more({'address': url});
	getGoodsList();
});

var page = 1;
function getGoodsList(){
	var url = "index.php?m=Mobile&c=Index&a=ajaxGetMore&type={$type}&p="+page;
	$('.get_more').show();
	$.ajax({
		type : "get",
		url:url,
		success: function(data)
		{
			console.log(data);
			if(data){
				$("#J_ItemList>ul").append(data);
				page++;
				$('.get_more').hide();
			}else{
				$('.get_more').hide();
				$('#getmore').remove();
			}
		}
	}); 
}
</script> 


<!-- 搜索 -->
<div class="search-wrapper"></div>
<!-- 购物车&返回顶部  -->
<div class="page-fix-button">
	<!--<div class="store-cart"><a class="picon icon-store-cart" href="http://wxv2.lppz.com/cart/index.jhtml">购物车</a><span></span></div> -->
	<div class="goto-top"><a class="picon icon-go-top" href="#">返回顶部</a></div>
</div>

<!-- 底部导航-->
<!-- 底部菜单 -->
<!-- 底部菜单 -->
<include file="public/footer_nav"/>

<!-- 底部JS -->
<script type="text/javascript">  
  $(function(){
  	 adjust();  
  })
        
  
        var timeout = null;//onresize触发次数过多，设置定时器  
        window.onresize = function () {  
            clearTimeout(timeout);  
            timeout = setTimeout(function () { adjust(); }, 100);//页面大小变化，重新加载页面以刷新MAP  
        }  
  
        //获取MAP中元素属性  
        function adjust() {  
            $('#planetmap area').each(function(){
            		var oldCoords = $(this).attr('coords')
            		 var newcoords = adjustPosition(oldCoords);  
            		 $(this).attr('coords',newcoords);
            })
        }  
  
        //调整MAP中坐标  
        function adjustPosition(position,w,h) {  
            var pageWidth =$('.mcube-item').width();//获取页面宽度  
            var imageWidth = 750;//图片的长宽  
            var imageHeigth = 1006;  
            var pageHeith = (pageWidth/imageWidth)*imageHeigth;//获取页面高度 
            var each = position.split(",");  
            //获取每个坐标点  
            for (var i = 0; i < each.length; i++) {  
                each[i] = Math.round(parseInt(each[i]) * pageWidth / imageWidth).toString();//x坐标  
                i++;  
                each[i] = Math.round(parseInt(each[i]) * pageHeith / imageHeigth).toString();//y坐标  
            }  
            //生成新的坐标点  
            var newPosition = "";  
            for (var i = 0; i < each.length; i++) {  
                newPosition += each[i];  
                if (i < each.length - 1) {  
                    newPosition += ",";  
                }  
            }  
            return newPosition;  
        }  

        //搜索
       function subsearch(){
       	var wp=$('#search-text').val();
       	location.href="{:U('Goods/search')}?q="+wp;
       }
</script>  


<script src="http://wxv2.lppz.com/shop_resource/wechat/js/app.js"></script>
</body>
</html>